package org.jeecg.modules.sg.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 退宿申请单
 * @Author: jeecg-boot
 * @Date:   2022-09-29
 * @Version: V1.0
 */
@Data
@TableName("sg_out_room")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="sg_out_room对象", description="退宿申请单")
public class SgOutRoom implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private java.lang.String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
	/**状态*/
    @Excel(name = "状态", width = 15, dicCode = "shzt")
    @Dict(dicCode = "shzt")
    @ApiModelProperty(value = "状态")
    private java.lang.String status;
	/**申请时间*/
	@Excel(name = "申请时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "申请时间")
    private java.util.Date appDate;
	/**审核时间*/
	@Excel(name = "审核时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "审核时间")
    private java.util.Date audDate;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private java.lang.String remark;
	/**人员*/
    @Excel(name = "人员",dictTable ="sg_person",dicText = "name",dicCode = "id", width = 15)
    @ApiModelProperty(value = "人员")
    @Dict(dictTable ="sg_person",dicText = "name",dicCode = "id")
    private java.lang.String presonId;
	/**退宿时间*/
	@Excel(name = "退宿时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "退宿时间")
    private java.util.Date outRoomDate;
	/**床卡费用*/
	@Excel(name = "床卡费用", width = 15)
    @ApiModelProperty(value = "床卡费用")
    private java.lang.Double berthCardCost;
    /**领用床卡*/
    @Excel(name = "领用床卡", width = 15, dicCode = "recipientsBerthCard")
    @Dict(dicCode = "shzf")
    @ApiModelProperty(value = "领用床卡")
    private java.lang.String recipientsBerthCard;
	/**房卡费用*/
	@Excel(name = "房卡费用", width = 15)
    @ApiModelProperty(value = "房卡费用")
    private java.lang.Double roomCardCost;
    /**领用房卡*/
    @Excel(name = "领用房卡", width = 15, dicCode = "recipientsRoomCard")
    @Dict(dicCode = "shzf")
    @ApiModelProperty(value = "领用房卡")
    private java.lang.String recipientsRoomCard;
	/**上个月费用*/
	@Excel(name = "上个月费用", width = 15)
    @ApiModelProperty(value = "上个月费用")
    private java.lang.Double lastMonthCost;
	/**本月费用*/
	@Excel(name = "本月费用", width = 15)
    @ApiModelProperty(value = "本月费用")
    private java.lang.Double nowMonthCost;
	/**费用承担*/
    @Excel(name = "费用承担", width = 15, dicCode = "costBearing")
    @Dict(dicCode = "cdfs")
    @ApiModelProperty(value = "费用承担")
    private java.lang.String costBearing;
	/**总费用*/
	@Excel(name = "总费用", width = 15)
    @ApiModelProperty(value = "总费用")
    private java.lang.Double allCost;
	/**入住天数*/
	@Excel(name = "入住天数", width = 15)
    @ApiModelProperty(value = "入住天数")
    private java.lang.Integer inRoomDays;
	/**房间号*/
    @Excel(name = "房间",dictTable ="sg_room",dicText = "name",dicCode = "id", width = 15)
    @ApiModelProperty(value = "房间")
    @Dict(dictTable ="sg_room",dicText = "name",dicCode = "id")
    private java.lang.String roomId;
	/**床位号*/
    @Excel(name = "床位号", dictTable ="sg_berth",dicText = "name",dicCode = "id", width = 15)
    @Dict(dictTable ="sg_berth",dicText = "name",dicCode = "id")
    private java.lang.String berthId;

    public void buildPerson(SgPerson sgPerson){
        sgPerson.setOutRoomDate(this.outRoomDate);
        sgPerson.setBerthCardCost(this.berthCardCost);
        sgPerson.setRecipientsBerthCard(this.recipientsBerthCard);
        sgPerson.setRoomCardCost(this.roomCardCost);
        sgPerson.setRecipientsRoomCard(this.recipientsRoomCard);
        sgPerson.setLastMonthCost(this.lastMonthCost);
        sgPerson.setNowMonthCost(this.nowMonthCost);
        sgPerson.setCostBearing(this.costBearing);
        sgPerson.setAllCost(this.allCost);
        sgPerson.setInRoomDays(this.inRoomDays);
        sgPerson.setStatus("ts");
    }
}
